{include file='/public/header'}

<div class="am-cf admin-main">
    {include file='/public/sidebar'}

    <!-- content start -->
    <div class="admin-content">
        <div class="admin-content-body">
            <div class="am-cf am-padding am-padding-bottom-0">
                <div class="am-fl am-cf"><strong class="am-text-primary am-text-lg">文档管理</strong> / <small>文档列表</small></div>
            </div>

            <hr>

            <div class="am-g">
                <div class="am-u-sm-12 am-u-md-6">
                    <div class="am-btn-toolbar">
                        <div class="am-btn-group am-btn-group-xs">
                            <a type="button" class="am-btn am-btn-default" href="{:url('admin/doc/add_new')}"><span class="am-icon-plus"></span> 新增文档</a>
                        </div>
                    </div>
                </div>
                <!--<div class="am-u-sm-12 am-u-md-3">-->
                    <!--<div class="am-form-group">-->
                        <!--<select data-am-selected="{btnSize: 'sm'}">-->
                            <!--<option value="option1">所有类别</option>-->
                            <!--<option value="option2">IT业界</option>-->
                            <!--<option value="option3">数码产品</option>-->
                            <!--<option value="option3">笔记本电脑</option>-->
                            <!--<option value="option3">平板电脑</option>-->
                            <!--<option value="option3">只能手机</option>-->
                            <!--<option value="option3">超极本</option>-->
                        <!--</select>-->
                    <!--</div>-->
                <!--</div>-->
                <!--<div class="am-u-sm-12 am-u-md-3">-->
                    <!--<div class="am-input-group am-input-group-sm">-->
                        <!--<input type="text" class="am-form-field">-->
                        <!--<span class="am-input-group-btn"><button class="am-btn am-btn-default" type="button">搜索</button></span>-->
                    <!--</div>-->
                <!--</div>-->
            </div>

            <div class="am-g">
                <div class="am-u-sm-12">
                        <table class="am-table am-table-striped am-table-hover table-main">
                            <thead>
                            <tr>
                                <th class="table-check"><input type="checkbox" /></th>
                                <th class="table-id">ID</th>
                                <th class="table-title">文档名</th>
                                <th class="table-title">发布状态</th>
                                <th class="table-set">操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            {volist name="list" id="vo" key="k"}
                            <tr>
                                <td><input type="checkbox" /></td>
                                <td>{$k}</td>
                                <td><a href="#">{$vo.name}</a></td>
                                <td>{if($vo['is_publish'])}已发布{else}<font color="red">未发布</font>{/if}</td>
                                <td>
                                    <div class="am-btn-toolbar">
                                        <div class="am-btn-group am-btn-group-xs">
                                            <button class="am-btn am-btn-default am-btn-xs am-text-secondary" onclick="location.href='{:url('admin/doc/edit_new',['id'=>$vo['id']])}'"><span class="am-icon-pencil-square-o"></span> 编辑文档</button>
                                            <button class="am-btn am-btn-default am-btn-xs am-text-primary" onclick="phpby.main.openFrame('添加目录','{:url('admin/doccatelog/add',['doc_id'=>$vo['id']])}')"><span class="am-icon-plus"></span> 添加目录</button>
                                            <button class="am-btn am-btn-default am-btn-xs am-text-success" onclick="location.href='{:url('admin/article/add_new',['doc_id'=>$vo['id']])}'"><span class="am-icon-plus"></span> 添加文章</button>
                                            <button class="am-btn am-btn-default am-btn-xs am-text-danger am-hide-sm-only" ajax-del="{:url('admin/doc/del',['id'=>$vo['id']])}"><span class="am-icon-trash-o"></span> 删除文档</button>
                                        </div>
                                    </div>
                                </td>
                            </tr>
                            {/volist}
                            </tbody>
                        </table>
                        <div class="am-cf">
                            共 {$total} 条记录
                            <div class="am-fr">
                                {$page|raw}
                            </div>
                        </div>
                </div>

            </div>
        </div>
    </div>
    <!-- content end -->
</div>

{include file='/public/footer'}
